(function () {
    var newRem = function () {
        var html = document.documentElement;
        var wh = window.innerHeight;
        html.style.fontSize = html.getBoundingClientRect().width / 10 + 'px';
        var oa=document.createAttribute("wh");
        html.attributes.setNamedItem(oa);
        html.setAttribute("wh",window.innerHeight);
    };
    window.addEventListener('resize', newRem, false);
    newRem();
})();

